<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <title>通知管理</title>
    <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
          name='viewport'/>
    <link rel="stylesheet" href="/assets/css/bootstrap.min.css">
    <link rel="stylesheet"
          href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i">
    <link rel="stylesheet" href="/assets/css/ready.css">
    <link rel="stylesheet" href="/assets/css/demo.css">
    <link rel="stylesheet" href="/assets/css/mystyle.css">
    <link rel="stylesheet" href="/assets/css/umeditor.css">
</head>
<body>
<div class="wrapper">
    <div th:replace="~{index::topbar}"></div>
    <div th:replace="~{index::sidebar(activeUri='/setting/notify')}"></div>
    <div class="main-panel">
        <div class="content">
            <div class="container-fluid">
                <h4 class="page-title">发布通知</h4>
                <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <div class="card-body">
                                <div class="row">
                                    <div class="col-md-3"></div>
                                    <form class="col-md-6" action="">
                                        <div class="input-group">
                                            <input type="date" class="form-control">
                                            <label>----</label>
                                            <input type="date" class="form-control">
                                            <div class="input-group-append">
                                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                <input class="btn btn-block btn-round" value="搜索" type="submit">
                                            </div>
                                        </div>
                                    </form>

                                    <div class="col-md-3">
                                        <div class="float-right">
                                            <button class="btn btn-success" data-toggle="modal" data-target="#AddNotify">新通知</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-12">
                        <div class="card">
                            <div class="card-header">
                                <div class="card-title text-center">通知列表</div>
                            </div>
                            <div class="card-body">
                                <table class="table table-hover">
                                    <thead>
                                    <tr>
                                        <th scope="col" class="text-md-center">ID</th>
                                        <th scope="col" class="text-md-center">标题</th>
                                        <th scope="col" class="text-md-center">上传时间</th>
                                        <th scope="col" class="text-md-center">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr th:each="notify,notifyStat:${n_lists}">
                                        <td class="text-md-center yc" th:text="${notify.ID}"></td>
                                        <td class="text-md-center" th:text="${notify.title}"><p>dragon</p></td>
                                        <td class="text-md-center" th:text="${notify.createTime}"><p class="was-validated">2019/01/11</p></td>
                                        <td class="text-md-center">
                                            <a class="badge badge-info" href="" data-toggle="modal" data-target="#ViewNotify" id="updateNotify">更新</a>
                                            <a class="badge badge-danger" href="" id="delNotify">删除</a>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div th:replace="~{index::footer}"></div>
    </div>
</div>
</div>
<!-- Modal -->
<!--AddNotify-->
<div class="modal fade" id="AddNotify" tabindex="-1" role="dialog" aria-labelledby="modalUpdatePro"
     aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header bg-primary">
                <h6 class="modal-title"><i class="la la-frown-o"></i> 增加通知</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body text-center">
                <form id="addNotifyModal" method="post">
                    <div class="form-group">
                        标题：<input type="text" class="form-control" placeholder="通知标题" id="NotifyTitle" name="Title">
                    </div>
                    <div class="form-group" name="GroupID">
                        通知组：<select class="form-control" name="UID">
                        <option th:each="Group,groupStat:${g_list}" th:value="${Group.groupID}" th:text="${Group.groupName}">1</option>
                    </select>
                    </div>
                    <div class="form-group">
                        通知内容：
                        <script id="NotifyText" name="Text" type="text/plain"></script>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="submitNotify">提交</button>
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
<!--ViewNotify-->
<div class="modal fade" id="ViewNotify" tabindex="-1" role="dialog" aria-labelledby="modalUpdatePro"
     aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header bg-primary">
                <h6 class="modal-title"><i class="la la-frown-o"></i> ViewNotify</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body text-center">
                <form id="updateNotifyModal" method="post">
                    <div class="form-group">
                        标题：<input type="text" class="form-control" placeholder="通知标题" id="UpdateTitle" name="Title">
                    </div>
                    <div class="form-group" name="GroupID">
                        通知组：<select class="form-control" name="UID" id="updateGroup">
                        <option th:each="Group,groupStat:${g_list}" th:value="${Group.groupID}" th:text="${Group.groupName}">1</option>
                    </select>
                    </div>
                    <div class="form-group">
                        通知内容：
                        <script id="updateNotifyText" name="Text" type="text/plain"></script>
                    </div>
                    <input type="hidden" id="UpdateID" name="ID">
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="UpdateSubmit">提交</button>
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
<!--DeleteNotify-->
<div class="modal fade" id="DeleteNotify" tabindex="-1" role="dialog" aria-labelledby="modalUpdatePro"
     aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
        <div class="modal-content">
            <div class="modal-header bg-primary">
                <h6 class="modal-title"><i class="la la-frown-o"></i> DeleteNotify</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body text-center">
                <p>Currently the pro version of the <b>Ready Dashboard</b> Bootstrap is in progress development</p>
                <p>
                    <b>We'll let you know when it's done</b></p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
</body>
<script src="/assets/js/core/jquery.3.2.1.min.js"></script>
<script src="/assets/js/plugin/jquery-ui-1.12.1.custom/jquery-ui.min.js"></script>
<script src="/assets/js/core/popper.min.js"></script>
<script src="/assets/js/core/bootstrap.min.js"></script>
<script src="/assets/js/plugin/chartist/chartist.min.js"></script>
<script src="/assets/js/plugin/chartist/plugin/chartist-plugin-tooltip.min.js"></script>
<script src="/assets/js/plugin/bootstrap-notify/bootstrap-notify.min.js"></script>
<script src="/assets/js/plugin/bootstrap-toggle/bootstrap-toggle.min.js"></script>
<script src="/assets/js/plugin/jquery-mapael/jquery.mapael.min.js"></script>
<script src="/assets/js/plugin/jquery-mapael/maps/world_countries.min.js"></script>
<script src="/assets/js/plugin/chart-circle/circles.min.js"></script>
<script src="/assets/js/plugin/jquery-scrollbar/jquery.scrollbar.min.js"></script>
<script src="/assets/js/ready.min.js"></script>
<script src="/assets/js/demo.js"></script>
<script src="/assets/js/umeditor.config.js"></script>
<script src="/assets/js/umeditor.min.js"></script>
<script src="/assets/js/zh-cn.js"></script>
<script src="/assets/js/Notify.js"></script>
</html>